<!--
 * @Author: 汪军 624473119@qq.com
 * @Date: 2023-10-22 13:13:43
 * @LastEditors: 汪军 624473119@qq.com
 * @LastEditTime: 2023-10-30 09:53:20
 * @FilePath: \app-formwork\src\pages\login\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template lang="pug">
view.modal-box
  //- 位置定位提示框
  u-modal(
    :show="data.show"
    :showConfirmButton="false")
    slot(name="default")
      div.flex.column
        view.tc.f-28 {{ data.title }}
        view.flex.justify-between.mt-48
          view.btn.cancel.mr-24(@click="onCancel") {{ data.btn1 }}
          view.btn.confirm(:class="{red: data.type == 2}" @click="onConfirm") {{ data.btn2 }}
</template>

<script setup>
const props = defineProps({
  data: {
    type: String,
    default: ""
  }
});
const emits = defineEmits(["cancel", "confirm"]);

const onCancel = () => {
  emits("cancel");
};
const onConfirm = () => {
  emits("confirm");
};
</script>

<style lang="stylus" scoped>
.modal-box
  .btn
    width: 268rpx;
    height: 72rpx;
    line-height: 72rpx;
    text-align: center;
    border-radius: 104rpx;
  .confirm
    background: #306EFF;
    color: #ffffff;
  .red
    background: #E84026
    color: #ffffff;
  .cancel
    background: rgba(48,110,255,0.12);
    color: #306EFF;
</style>
